package com.ym.b2b.product.dao.impl;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.ym.b2b.commons.dao.BaseDao;
import com.ym.b2b.product.dao.EmBProductIntroductionDAO;
import com.ym.b2b.product.sqlbean.EmBProductIntroduction;

@Repository
public class EmBProductIntroductionDAOImpl<T> extends BaseDao<T> implements EmBProductIntroductionDAO {

    @Override
    public void insertEmBProductIntroduction(EmBProductIntroduction record) throws DataAccessException {
        insert("EM_B_PRODUCT_INTRODUCTION.insertEmBProductIntroduction", record);

    }

    @Override
    public void updateEmBProductIntroduction(EmBProductIntroduction record) throws DataAccessException {
        update("EM_B_PRODUCT_INTRODUCTION.updateEmBProductIntroduction", record);

    }

    @Override
    public EmBProductIntroduction showEmBProductIntroductionDetail(String productCode) throws DataAccessException {
        return (EmBProductIntroduction) find("EM_B_PRODUCT_INTRODUCTION.showEmBProductIntroductionDetail", productCode);
    }

    @Override
    public EmBProductIntroduction showMobileEmBProductIntroductionDetail(String productCode) throws DataAccessException {
        return (EmBProductIntroduction) find("EM_B_PRODUCT_INTRODUCTION.showMobileEmBProductIntroductionDetail",
                                             productCode);
    }

}
